Despite the increasing number of studies of barred galaxies at intermediate and high redshifts, double-barred (S2B) systems have only been identified in the nearby (z<0.04) universe thus far. In this feasibility study we demonstrate that the detection and analysis of S2Bs is possible at intermediate redshifts (0.1 < z < 0.5) with the exquisite resolution of the Hubble Space Telescope Advanced Camera for Surveys (HST/ACS). We identify barred galaxies in the HST/ACS data of the Great Observatories Origins Deep Survey (GOODS) using a novel method. The radial profile of the Gini coefficient -- a model-independent structure parameter -- is able to detect bars in early-type galaxies that are large enough that they might host an inner bar of sufficient angular size. Using this method and subsequent examination with unsharp masks and ellipse fits we identified the two most distant S2Bs currently known (at redshifts z=0.103 and z=0.148). We investigate the underlying stellar populations of these two galaxies through a detailed colour analysis, in order to demonstrate the analysis that could be performed on a future sample of intermediate-redshift S2Bs. We also identify two S2Bs and five S2B candidates in the HST/ACS data of the Cosmic Evolution Survey (COSMOS). Our detections of distant S2Bs show that deep surveys like GOODS and COSMOS have the potential to push the limit for S2B detection and analysis out by a factor of ten in redshift and lookback time (z=0.5, t=5Gyr) compared to the previously known S2Bs. This in turn would provide new insight into the formation of these objects.